package com.example.pedometer;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.widget.TextView;

import com.example.timecalculous.R;

/**
 * Created by ASUS on 2017/2/24.
 */

public class StartActivity1 extends Activity {
    private TextView runTextView, strongTextView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.start);

        runTextView = (TextView)findViewById(R.id.run);
        strongTextView = (TextView)findViewById(R.id.strong);

        runTextView.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View arg0) {
                // TODO Auto-generated method stub
                Intent intent = new Intent();
                intent.setClass(StartActivity1.this, StepCounterActivity.class);
                Bundle bundle = new Bundle();
                bundle.putBoolean("run", false);
                intent.putExtras(bundle);
                startActivity(intent);
            }
        });

        strongTextView.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {
                // TODO Auto-generated method stub
                Intent intent = new Intent();
                intent.setClass(StartActivity1.this, StepCounterActivity.class);
                Bundle bundle = new Bundle();
                bundle.putBoolean("run", true);
                intent.putExtras(bundle);
                startActivity(intent);
            }
        });

    }
}
